import request from "@/utils/request";
export const apis = {
  add: (data) => {
    return request({
      url: "/cataloguePortTree/add",
      method: "post",
      data: data,
    });
  },
  query: (params) => {
    return request({
      url: "/cataloguePortTree/list",
      method: "get",
      params,
    });
  },
  del: (row) => {
    return request({
      url: "/cataloguePortTree/delete",
      method: "delete",
      data: {
        id: row.id,
      },
    });
  },
  update: (data) => {
    return request({
      url: "/cataloguePortTree/edit",
      method: "post",
      data: data,
    });
  },
};

export const file = {
  add: (data) => {
    return request({
      url: "/fileOnPort/create",
      method: "post",
      data: data,
    });
  },
  query: (params) => {
    return request({
      url: "/fileOnPort/list",
      method: "get",
      params,
    });
  },
  del: (row) => {
    return request({
      url: "/fileOnPort/delete",
      method: "get",
      params: {
        id: row.id,
      },
    });
  },
  update: (data) => {
    return request({
      url: "/fileOnPort/update",
      method: "post",
      data: data,
    });
  },
};
